package com.bawei.shopping2.module

import com.bawei.shopping2.http.ApiService
import com.bawei.shopping2.http.RetrofitManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

//依赖注入service模块：单例
@Module
@InstallIn(SingletonComponent::class)
class ServiceModule {

    @Singleton
    @Provides
    fun getService():ApiService{
        return RetrofitManager.getRetrofit().create(ApiService::class.java)
    }





}